//日志收集定义
const logger={
    levels:{
      ERROR:0,
      WARN:1,
      INFO:2,
      DEBUG:3
    },
    currentLevel:0,
    init:function(level){
      this.currentLevel=typeof(this.levels[level])!=='undefined'?this.levels[level]:0;
    },
    log:function(level,msg){
      if(this.levels[level]>=this.currentLevel){
        console.log(`[${level}][${msg}]`);
      }
    },
  }
  //日志收集部分
  class logCollect{
    constructor(){
      this._watchReceiverData=watchReceiverData
      deviceId=getDeviceId
    }
      getBLEDeviceServices(deviceId,watchReceiverData){
      console.log("蓝牙连接中...")
      if(res.service&&res.service.length>0){
        console.log("getBLEDeviceServices result" + JSON.stringify(res))
      }
      else{
        console.log("getBLEDeviceServices failuer")
      }
    }
      getBLEDeviceCharacteristics(deviceId, serviceId){
        console.log("getBLEDeviceCharacteristics success", res.characteristics);
        if (item.properties.read) {
          console.log("read uuid;" + item.uuid)
        }
        if (item.properties.write) {
          console.log("write uuid;" + item.uuid)
        }
        if (item.properties.notify || item.properties.indicate) {
          console.log("notify uuid :" + item.uuid)
        if (!notifyBLECharacteristicValueChange) {
            console.log("getBLEDeviceCharacteristics 失败 应该重新连接蓝牙设备",res)
          }
          else{
            'notifyBLECharacteristicValueChange result success', res.errMsg
          }
        }
      }
      createBLEConnection()
  }